<div class="modal-header">
    <div class="modal-title">{{i.key > 0 ? '编辑' : '添加'}}-门店（基于HTML模板表单写法）</div>
</div>
<form #f="ngForm" (ngSubmit)="save()" nz-form [nzType]="'horizontal'">
    <div nz-form-item nz-row class="mb-sm">
        <div nz-form-label nz-col [nzSpan]="4"><label>任务名称</label></div>
        <div nz-form-control nz-col [nzSpan]="8">
            <nz-tag *ngIf="i.key > 0">{{i.title}}</nz-tag>
            <input *ngIf="i.key == 0" nz-input [(ngModel)]="i.title" name="title" maxlength="20"  required />
        </div>
    </div>
    <div nz-form-item nz-row class="mb-sm">
        <div nz-form-label nz-col [nzSpan]="4"><label>编号</label></div>
        <div nz-form-control nz-col [nzSpan]="8">
            <input nz-input [(ngModel)]="i.no" name="no" maxlength="20" required />
            <p nz-form-explain></p>
        </div>
        <div nz-form-label nz-col [nzSpan]="4"><label>拥有者</label></div>
        <div nz-form-control nz-col [nzSpan]="8">
            <input nz-input [(ngModel)]="i.owner" name="owner" maxlength="30" required />
            <p nz-form-explain>如：曲丽丽等拥有者信息</p>
        </div>
    </div>
    <div nz-form-item nz-row class="mb-sm">
        <div nz-form-label nz-col [nzSpan]="4"><label>callNo</label></div>
        <div nz-form-control nz-col [nzSpan]="8">
            <input nz-input [(ngModel)]="i.callNo" name="callNo" maxlength="50" required />
        </div>
        <div nz-form-label nz-col [nzSpan]="4"><label>href</label></div>
        <div nz-form-control nz-col [nzSpan]="8">
            <input nz-input [(ngModel)]="i.href" name="href" maxlength="50" required />
        </div>
    </div>
    <div nz-form-item nz-row class="mb-sm">
        <div nz-form-label nz-col [nzSpan]="4"><label>progress</label></div>
        <div nz-form-control nz-col [nzSpan]="8">
            <input nz-input [(ngModel)]="i.progress" name="progress" required />
        </div>
        <div nz-form-label nz-col [nzSpan]="4"><label>status</label></div>
        <div nz-form-control nz-col [nzSpan]="8">
            <nz-select [(ngModel)]="i.status" name="status" [nzPlaceHolder]="'请选择'" [nzShowSearch]="true">
                <nz-option *ngFor="let i of status; let idx = index" [nzLabel]="i.text" [nzValue]="idx"></nz-option>
            </nz-select>
        </div>
    </div>
    <div nz-form-item nz-row class="mb-sm">
        <div nz-form-label nz-col [nzSpan]="4"><label>avatar</label></div>
        <div nz-form-control nz-col [nzSpan]="8">
            <input nz-input [(ngModel)]="i.avatar" name="avatar" maxlength="30" required />
        </div>
    </div>
    <div class="modal-footer">
        <button nz-button type="button" (click)="close()">关闭</button>
        <button nz-button [disabled]="!f.form.valid || !f.form.dirty" [nzLoading]="http.loading" [nzType]="'primary'">保存</button>
    </div>
</form>
